<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>不new出来Point的话会报错</title>
	</head>
	<body>
		<script>
			class Point {
				constructor(x, y) {
					this.x = x;
					this.y = y;
				}
			
				toString() {
					return '(' + this.x + ', ' + this.y + ')';
				}
			}
			let p = Point(); //TypeError: Class constructor Point cannot be invoked without 'new'
		</script>
	</body>
</html>
